package com.beyondsoft.dtc.mobile.automation.model;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

/**
 * Created by Robin on 3/11/2016.
 */
public class Task {

	@Expose
	@SerializedName("monkey_num")
	private int monkeyNum;

	@Expose
	@SerializedName("be_traversal")
	private boolean beTraversal;

	@Expose
	@SerializedName("API_URL")
	private String api_url = "";

	@Expose
	@SerializedName("STORAGE_URL")
	private String storage_url = "";

	@Expose
	@SerializedName("task_id")
	private String taskId = "";// 任务id

	@Expose
	@SerializedName("app_url")
	private String appUrl = "";// app地址

	@Expose
	@SerializedName("script_url")
	private String scriptUrl = "";// test script url

	@Expose
	@SerializedName("app")
	private ApkFile apkFile = new ApkFile(); // apk file info

	@Expose
	@SerializedName("devices")
	private List<Device> devices = new ArrayList<Device>();
	
	@Expose
	@SerializedName("user_name")
	private String userName;

	@Expose
	@SerializedName("password")
	private String password;
	
	@Expose
	@SerializedName("need_load")
	private String needLoad;
	
	@Expose
	@SerializedName("token")
	private String token = "";

	@Expose
	@SerializedName("mail")
	private String mail;

	public Task() {
	}

	public int getMonkeyNum() {
		return monkeyNum;
	}

	public void setMonkeyNum(int monkeyNum) {
		this.monkeyNum = monkeyNum;
	}

	public boolean isBeTraversal() {
		return beTraversal;
	}

	public void setBeTraversal(boolean beTraversal) {
		this.beTraversal = beTraversal;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getUserName() {
		return userName;
	}



	public void setUserName(String userName) {
		this.userName = userName;
	}



	public String getPassword() {
		return password;
	}



	public void setPassword(String password) {
		this.password = password;
	}



	public String getNeedLoad() {
//		if(null == needLoad){
//			needLoad = "";
//		}
		return needLoad;
	}



	public void setNeedLoad(String needLoad) {
		this.needLoad = needLoad;
	}



	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getAppUrl() {
		return appUrl;
	}

	public void setAppUrl(String appUrl) {
		this.appUrl = appUrl;
	}

	public String getScriptUrl() {
		return scriptUrl;
	}

	public void setScriptUrl(String scriptUrl) {
		this.scriptUrl = scriptUrl;
	}

	public List<Device> getDevices() {
		return devices;
	}

	public void setDevices(List<Device> devices) {
		this.devices = devices;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public ApkFile getApkFile() {
		return apkFile;
	}

	public void setApkFile(ApkFile apkFile) {
		this.apkFile = apkFile;
	}

	public String getApi_url() {
		return api_url;
	}

	public void setApi_url(String api_url) {
		this.api_url = api_url;
	}

	public String getStorage_url() {
		return storage_url;
	}

	public void setStorage_url(String storage_url) {
		this.storage_url = storage_url;
	}

	@Override
	public String toString() {
		return "Task{" + "api_url='" + api_url + '\'' + "storage_url='"
				+ storage_url + '\'' + "taskId='" + taskId + '\''
				+ ", appUrl='" + appUrl + '\'' + ", scriptUrl='" + scriptUrl
				+ '\'' + ", apkFile=" + apkFile + ", devices=" + devices
				+ ", token='" + token + '\'' + '}';
	}

}
